<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.HaskellSuite</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.html"><span class="hs-identifier">Distribution.Simple.Program</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildPaths.html"><span class="hs-identifier">Distribution.Simple.BuildPaths</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier">simpleParsec</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier">includeDirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html"><span class="hs-identifier">Distribution.Simple.PackageIndex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PackageIndex</span></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier">Platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html"><span class="hs-identifier">Language.Haskell.Extension</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Builtin.html"><span class="hs-identifier">Distribution.Simple.Program.Builtin</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#configure"><span class="hs-identifier hs-type">configure</span></a></span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span id="configure"><span class="annot"><span class="annottext">configure :: Verbosity
-&gt; Maybe String
-&gt; Maybe String
-&gt; ProgramDb
-&gt; IO (Compiler, Maybe Platform, ProgramDb)
</span><a href="Distribution.Simple.HaskellSuite.html#configure"><span class="hs-identifier hs-var hs-var">configure</span></a></span></span><span> </span><span id="local-6989586621679716470"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716469"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679716469"><span class="hs-identifier hs-var">mbHcPath</span></a></span></span><span> </span><span id="local-6989586621679716468"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679716468"><span class="hs-identifier hs-var">hcPkgPath</span></a></span></span><span> </span><span id="local-6989586621679716467"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716467"><span class="hs-identifier hs-var">progdb0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>  </span><span class="hs-comment">-- We have no idea how a haskell-suite tool is named, so we require at</span><span>
</span><span id="line-34"></span><span>  </span><span class="hs-comment">-- least some information from the user.</span><span>
</span><span id="line-35"></span><span>  </span><span id="local-6989586621679716466"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716466"><span class="hs-identifier hs-var">hcPath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679716465"><span class="annot"><span class="annottext">msg :: String
</span><a href="#local-6989586621679716465"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;You have to provide name or path of a haskell-suite tool (-w PATH)&quot;</span></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">IO String -&gt; (String -&gt; IO String) -&gt; Maybe String -&gt; IO String
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO String
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716465"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679716469"><span class="hs-identifier hs-var">mbHcPath</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679716468"><span class="hs-identifier hs-var">hcPkgPath</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--with-hc-pkg option is ignored for haskell-suite&quot;</span></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679716459"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679716459"><span class="hs-identifier hs-var">comp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716458"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716458"><span class="hs-identifier hs-var">confdCompiler</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716457"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716457"><span class="hs-identifier hs-var">progdb1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ProgramDb -&gt; IO (Compiler, ConfiguredProgram, ProgramDb)
</span><a href="#local-6989586621679716456"><span class="hs-identifier hs-var">configureCompiler</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716466"><span class="hs-identifier hs-var">hcPath</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716467"><span class="hs-identifier hs-var">progdb0</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>  </span><span class="hs-comment">-- Update our pkg tool. It uses the same executable as the compiler, but</span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-comment">-- all command start with &quot;pkg&quot;</span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679716455"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716455"><span class="hs-identifier hs-var">confdPkg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuitePkgProgram"><span class="hs-identifier hs-var">haskellSuitePkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716457"><span class="hs-identifier hs-var">progdb1</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679716452"><span class="annot"><span class="annottext">progdb2 :: ProgramDb
</span><a href="#local-6989586621679716452"><span class="hs-identifier hs-var hs-var">progdb2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#updateProgram"><span class="hs-identifier hs-var">updateProgram</span></a></span><span>
</span><span id="line-49"></span><span>          </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716455"><span class="hs-identifier hs-var">confdPkg</span></a></span><span>
</span><span id="line-50"></span><span>            </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">programLocation :: ProgramLocation
</span><a href="Distribution.Simple.Program.Types.html#programLocation"><span class="hs-identifier hs-var">programLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; ProgramLocation
</span><a href="Distribution.Simple.Program.Types.html#programLocation"><span class="hs-identifier hs-var hs-var">programLocation</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716458"><span class="hs-identifier hs-var">confdCompiler</span></a></span><span>
</span><span id="line-51"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">programDefaultArgs :: [String]
</span><a href="#local-6989586621679716449"><span class="hs-identifier hs-var">programDefaultArgs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pkg&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-52"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-53"></span><span>          </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716457"><span class="hs-identifier hs-var">progdb1</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>  </span><span class="annot"><span class="annottext">(Compiler, Maybe Platform, ProgramDb)
-&gt; IO (Compiler, Maybe Platform, ProgramDb)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679716459"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Platform
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716452"><span class="hs-identifier hs-var">progdb2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>    </span><span id="local-6989586621679716456"><span class="annot"><span class="annottext">configureCompiler :: String -&gt; ProgramDb -&gt; IO (Compiler, ConfiguredProgram, ProgramDb)
</span><a href="#local-6989586621679716456"><span class="hs-identifier hs-var hs-var">configureCompiler</span></a></span></span><span> </span><span id="local-6989586621679716442"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716442"><span class="hs-identifier hs-var">hcPath</span></a></span></span><span> </span><span id="local-6989586621679716441"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716441"><span class="hs-identifier hs-var">progdb0'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-59"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-60"></span><span>        </span><span id="local-6989586621679716440"><span class="annot"><span class="annottext">haskellSuiteProgram' :: Program
</span><a href="#local-6989586621679716440"><span class="hs-identifier hs-var hs-var">haskellSuiteProgram'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-61"></span><span>          </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuiteProgram"><span class="hs-identifier hs-var">haskellSuiteProgram</span></a></span><span>
</span><span id="line-62"></span><span>            </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">programFindLocation :: Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="#local-6989586621679716438"><span class="hs-identifier hs-var">programFindLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679716437"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716437"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679716436"><span class="annot"><span class="annottext">ProgramSearchPath
</span><a href="#local-6989586621679716436"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ProgramSearchPath -&gt; String -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Find.html#findProgramOnSearchPath"><span class="hs-identifier hs-var">findProgramOnSearchPath</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716437"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramSearchPath
</span><a href="#local-6989586621679716436"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716442"><span class="hs-identifier hs-var">hcPath</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span>      </span><span class="hs-comment">-- NB: cannot call requireProgram right away &#8212; it'd think that</span><span>
</span><span id="line-65"></span><span>      </span><span class="hs-comment">-- the program is already configured and won't reconfigure it again.</span><span>
</span><span id="line-66"></span><span>      </span><span class="hs-comment">-- Instead, call configureProgram directly first.</span><span>
</span><span id="line-67"></span><span>      </span><span id="local-6989586621679716434"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716434"><span class="hs-identifier hs-var">progdb1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; IO ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#configureProgram"><span class="hs-identifier hs-var">configureProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679716440"><span class="hs-identifier hs-var">haskellSuiteProgram'</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716441"><span class="hs-identifier hs-var">progdb0'</span></a></span><span>
</span><span id="line-68"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679716432"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716432"><span class="hs-identifier hs-var">confdCompiler</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716431"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716431"><span class="hs-identifier hs-var">progdb2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679716440"><span class="hs-identifier hs-var">haskellSuiteProgram'</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716434"><span class="hs-identifier hs-var">progdb1</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>      </span><span id="local-6989586621679716430"><span class="annot"><span class="annottext">[(Extension, Maybe String)]
</span><a href="#local-6989586621679716430"><span class="hs-identifier hs-var">extensions</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO [(Extension, Maybe String)]
</span><a href="Distribution.Simple.HaskellSuite.html#getExtensions"><span class="hs-identifier hs-var">getExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716432"><span class="hs-identifier hs-var">confdCompiler</span></a></span><span>
</span><span id="line-71"></span><span>      </span><span id="local-6989586621679716428"><span class="annot"><span class="annottext">[(Language, String)]
</span><a href="#local-6989586621679716428"><span class="hs-identifier hs-var">languages</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO [(Language, String)]
</span><a href="Distribution.Simple.HaskellSuite.html#getLanguages"><span class="hs-identifier hs-var">getLanguages</span></a></span><span>  </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716432"><span class="hs-identifier hs-var">confdCompiler</span></a></span><span>
</span><span id="line-72"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679716426"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716426"><span class="hs-identifier hs-var">compName</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716425"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679716425"><span class="hs-identifier hs-var">compVersion</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO (String, Version)
</span><a href="Distribution.Simple.HaskellSuite.html#getCompilerVersion"><span class="hs-identifier hs-var">getCompilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716470"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716432"><span class="hs-identifier hs-var">confdCompiler</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-76"></span><span>        </span><span id="local-6989586621679716417"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679716417"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler :: CompilerId
-&gt; AbiTag
-&gt; [CompilerId]
-&gt; [(Language, String)]
-&gt; [(Extension, Maybe String)]
-&gt; Map String String
-&gt; Compiler
</span><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-77"></span><span>          </span><span class="annot"><span class="annottext">compilerId :: CompilerId
</span><a href="#local-6989586621679716415"><span class="hs-identifier hs-var">compilerId</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; Version -&gt; CompilerId
</span><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-var">CompilerId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; CompilerFlavor
</span><a href="Distribution.Compiler.html#HaskellSuite"><span class="hs-identifier hs-var">HaskellSuite</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716426"><span class="hs-identifier hs-var">compName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679716425"><span class="hs-identifier hs-var">compVersion</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-78"></span><span>          </span><span class="annot"><span class="annottext">compilerAbiTag :: AbiTag
</span><a href="#local-6989586621679716412"><span class="hs-identifier hs-var">compilerAbiTag</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AbiTag
</span><a href="Distribution.Compiler.html#NoAbiTag"><span class="hs-identifier hs-var">NoAbiTag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-79"></span><span>          </span><span class="annot"><span class="annottext">compilerCompat :: [CompilerId]
</span><a href="#local-6989586621679716410"><span class="hs-identifier hs-var">compilerCompat</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span>          </span><span class="annot"><span class="annottext">compilerLanguages :: [(Language, String)]
</span><a href="#local-6989586621679716409"><span class="hs-identifier hs-var">compilerLanguages</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Language, String)]
</span><a href="#local-6989586621679716428"><span class="hs-identifier hs-var">languages</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-81"></span><span>          </span><span class="annot"><span class="annottext">compilerExtensions :: [(Extension, Maybe String)]
</span><a href="#local-6989586621679716408"><span class="hs-identifier hs-var">compilerExtensions</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Extension, Maybe String)]
</span><a href="#local-6989586621679716430"><span class="hs-identifier hs-var">extensions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-82"></span><span>          </span><span class="annot"><span class="annottext">compilerProperties :: Map String String
</span><a href="#local-6989586621679716407"><span class="hs-identifier hs-var">compilerProperties</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map String String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>      </span><span class="annot"><span class="annottext">(Compiler, ConfiguredProgram, ProgramDb)
-&gt; IO (Compiler, ConfiguredProgram, ProgramDb)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679716417"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716432"><span class="hs-identifier hs-var">confdCompiler</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716431"><span class="hs-identifier hs-var">progdb2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#hstoolVersion"><span class="hs-identifier hs-type">hstoolVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-88"></span><span id="hstoolVersion"><span class="annot"><span class="annottext">hstoolVersion :: Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.HaskellSuite.html#hstoolVersion"><span class="hs-identifier hs-var hs-var">hstoolVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (String -&gt; String) -&gt; Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.Utils.html#findProgramVersion"><span class="hs-identifier hs-var">findProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--hspkg-version&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#numericVersion"><span class="hs-identifier hs-type">numericVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span id="numericVersion"><span class="annot"><span class="annottext">numericVersion :: Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.HaskellSuite.html#numericVersion"><span class="hs-identifier hs-var hs-var">numericVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (String -&gt; String) -&gt; Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.Utils.html#findProgramVersion"><span class="hs-identifier hs-var">findProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--compiler-version&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; String
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; String)
-&gt; (String -&gt; Maybe String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Maybe String
forall a. [a] -&gt; Maybe a
</span><a href="Distribution.Utils.Generic.html#safeLast"><span class="hs-identifier hs-var">safeLast</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; Maybe String)
-&gt; (String -&gt; [String]) -&gt; String -&gt; Maybe String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#getCompilerVersion"><span class="hs-identifier hs-type">getCompilerVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span id="getCompilerVersion"><span class="annot"><span class="annottext">getCompilerVersion :: Verbosity -&gt; ConfiguredProgram -&gt; IO (String, Version)
</span><a href="Distribution.Simple.HaskellSuite.html#getCompilerVersion"><span class="hs-identifier hs-var hs-var">getCompilerVersion</span></a></span></span><span> </span><span id="local-6989586621679716398"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716398"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716397"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716397"><span class="hs-identifier hs-var">prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-95"></span><span>  </span><span id="local-6989586621679716396"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716396"><span class="hs-identifier hs-var">output</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; [String] -&gt; IO String
forall mode.
KnownIODataMode mode =&gt;
Verbosity -&gt; String -&gt; [String] -&gt; IO mode
</span><a href="Distribution.Simple.Utils.html#rawSystemStdout"><span class="hs-identifier hs-var">rawSystemStdout</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716398"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716397"><span class="hs-identifier hs-var">prog</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--compiler-version&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-97"></span><span>    </span><span id="local-6989586621679716393"><span class="annot"><span class="annottext">parts :: [String]
</span><a href="#local-6989586621679716393"><span class="hs-identifier hs-var hs-var">parts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716396"><span class="hs-identifier hs-var">output</span></a></span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621679716391"><span class="annot"><span class="annottext">name :: String
</span><a href="#local-6989586621679716391"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#safeInit"><span class="hs-identifier hs-var">safeInit</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716393"><span class="hs-identifier hs-var">parts</span></a></span><span> </span><span class="hs-comment">-- there shouldn't be any spaces in the name anyway</span><span>
</span><span id="line-99"></span><span>    </span><span id="local-6989586621679716388"><span class="annot"><span class="annottext">versionStr :: String
</span><a href="#local-6989586621679716388"><span class="hs-identifier hs-var hs-var">versionStr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; String
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; String) -&gt; Maybe String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Maybe String
forall a. [a] -&gt; Maybe a
</span><a href="Distribution.Utils.Generic.html#safeLast"><span class="hs-identifier hs-var">safeLast</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716393"><span class="hs-identifier hs-var">parts</span></a></span><span>
</span><span id="line-100"></span><span>  </span><span id="local-6989586621679716387"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679716387"><span class="hs-identifier hs-var">version</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-101"></span><span>    </span><span class="annot"><span class="annottext">IO Version
-&gt; (Version -&gt; IO Version) -&gt; Maybe Version -&gt; IO Version
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO Version
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716398"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;haskell-suite: couldn't determine compiler version&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Version -&gt; IO Version
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Version -&gt; IO Version) -&gt; Maybe Version -&gt; IO Version
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-102"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; Maybe Version
forall a. Parsec a =&gt; String -&gt; Maybe a
</span><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier hs-var">simpleParsec</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716388"><span class="hs-identifier hs-var">versionStr</span></a></span><span>
</span><span id="line-103"></span><span>  </span><span class="annot"><span class="annottext">(String, Version) -&gt; IO (String, Version)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716391"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679716387"><span class="hs-identifier hs-var">version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#getExtensions"><span class="hs-identifier hs-type">getExtensions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-106"></span><span id="getExtensions"><span class="annot"><span class="annottext">getExtensions :: Verbosity -&gt; ConfiguredProgram -&gt; IO [(Extension, Maybe String)]
</span><a href="Distribution.Simple.HaskellSuite.html#getExtensions"><span class="hs-identifier hs-var hs-var">getExtensions</span></a></span></span><span> </span><span id="local-6989586621679716385"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716385"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716384"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716384"><span class="hs-identifier hs-var">prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-107"></span><span>  </span><span id="local-6989586621679716383"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716383"><span class="hs-identifier hs-var">extStrs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-108"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; [String]) -&gt; IO String -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-109"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; [String] -&gt; IO String
forall mode.
KnownIODataMode mode =&gt;
Verbosity -&gt; String -&gt; [String] -&gt; IO mode
</span><a href="Distribution.Simple.Utils.html#rawSystemStdout"><span class="hs-identifier hs-var">rawSystemStdout</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716385"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716384"><span class="hs-identifier hs-var">prog</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--supported-extensions&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-110"></span><span>  </span><span class="annot"><span class="annottext">[(Extension, Maybe String)] -&gt; IO [(Extension, Maybe String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679716381"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-X&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Extension -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679716381"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679716381"><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679716381"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe Extension) -&gt; [String] -&gt; [Maybe Extension]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Extension
forall a. Parsec a =&gt; String -&gt; Maybe a
</span><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier hs-var">simpleParsec</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716383"><span class="hs-identifier hs-var">extStrs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#getLanguages"><span class="hs-identifier hs-type">getLanguages</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-114"></span><span id="getLanguages"><span class="annot"><span class="annottext">getLanguages :: Verbosity -&gt; ConfiguredProgram -&gt; IO [(Language, String)]
</span><a href="Distribution.Simple.HaskellSuite.html#getLanguages"><span class="hs-identifier hs-var hs-var">getLanguages</span></a></span></span><span> </span><span id="local-6989586621679716379"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716379"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716378"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716378"><span class="hs-identifier hs-var">prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-115"></span><span>  </span><span id="local-6989586621679716377"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716377"><span class="hs-identifier hs-var">langStrs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-116"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; [String]) -&gt; IO String -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-117"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; [String] -&gt; IO String
forall mode.
KnownIODataMode mode =&gt;
Verbosity -&gt; String -&gt; [String] -&gt; IO mode
</span><a href="Distribution.Simple.Utils.html#rawSystemStdout"><span class="hs-identifier hs-var">rawSystemStdout</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716379"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716378"><span class="hs-identifier hs-var">prog</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--supported-languages&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-118"></span><span>  </span><span class="annot"><span class="annottext">[(Language, String)] -&gt; IO [(Language, String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679716376"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-G&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Language -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679716376"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679716376"><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679716376"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe Language) -&gt; [String] -&gt; [Maybe Language]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Language
forall a. Parsec a =&gt; String -&gt; Maybe a
</span><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier hs-var">simpleParsec</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716377"><span class="hs-identifier hs-var">langStrs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-comment">-- Other compilers do some kind of a packagedb stack check here. Not sure</span><span>
</span><span id="line-122"></span><span class="hs-comment">-- if we need something like that as well.</span><span>
</span><span id="line-123"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#getInstalledPackages"><span class="hs-identifier hs-type">getInstalledPackages</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-124"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html#InstalledPackageIndex"><span class="hs-identifier hs-type">InstalledPackageIndex</span></a></span><span>
</span><span id="line-125"></span><span id="getInstalledPackages"><span class="annot"><span class="annottext">getInstalledPackages :: Verbosity
-&gt; PackageDBStack -&gt; ProgramDb -&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.HaskellSuite.html#getInstalledPackages"><span class="hs-identifier hs-var hs-var">getInstalledPackages</span></a></span></span><span> </span><span id="local-6989586621679716374"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716374"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716373"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679716373"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679716372"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716372"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-126"></span><span>  </span><span class="annot"><span class="annottext">([[InstalledPackageInfo]] -&gt; InstalledPackageIndex)
-&gt; IO [[InstalledPackageInfo]] -&gt; IO InstalledPackageIndex
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; InstalledPackageIndex
</span><a href="Distribution.Simple.PackageIndex.html#fromList"><span class="hs-identifier hs-var">PackageIndex.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([InstalledPackageInfo] -&gt; InstalledPackageIndex)
-&gt; ([[InstalledPackageInfo]] -&gt; [InstalledPackageInfo])
-&gt; [[InstalledPackageInfo]]
-&gt; InstalledPackageIndex
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[[InstalledPackageInfo]] -&gt; [InstalledPackageInfo]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO [[InstalledPackageInfo]] -&gt; IO InstalledPackageIndex)
-&gt; IO [[InstalledPackageInfo]] -&gt; IO InstalledPackageIndex
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
-&gt; (PackageDB -&gt; IO [InstalledPackageInfo])
-&gt; IO [[InstalledPackageInfo]]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#for"><span class="hs-identifier hs-var">for</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679716373"><span class="hs-identifier hs-var">packagedbs</span></a></span><span> </span><span class="annot"><span class="annottext">((PackageDB -&gt; IO [InstalledPackageInfo])
 -&gt; IO [[InstalledPackageInfo]])
-&gt; (PackageDB -&gt; IO [InstalledPackageInfo])
-&gt; IO [[InstalledPackageInfo]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679716368"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679716368"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679716367"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716367"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-128"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO String
</span><a href="Distribution.Simple.Program.html#getDbProgramOutput"><span class="hs-identifier hs-var">getDbProgramOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716374"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuitePkgProgram"><span class="hs-identifier hs-var">haskellSuitePkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716372"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-129"></span><span>                </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dump&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; String
</span><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var">packageDbOpt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679716368"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-130"></span><span>         </span><span class="annot"><span class="annottext">IO String -&gt; (ExitCode -&gt; IO String) -&gt; IO String
forall a. IO a -&gt; (ExitCode -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Compat.Exception.html#catchExit"><span class="hs-operator hs-var">`catchExit`</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">ExitCode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO String
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716374"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO String) -&gt; String -&gt; IO String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pkg dump failed&quot;</span></span><span>
</span><span id="line-131"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either [String] [InstalledPackageInfo]
</span><a href="#local-6989586621679716363"><span class="hs-identifier hs-var">parsePackages</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716367"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-132"></span><span>         </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679716362"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679716362"><span class="hs-identifier hs-var">ok</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; IO [InstalledPackageInfo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679716362"><span class="hs-identifier hs-var">ok</span></a></span><span>
</span><span id="line-133"></span><span>         </span><span class="annot"><span class="annottext">Either [String] [InstalledPackageInfo]
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO [InstalledPackageInfo]
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716374"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;failed to parse output of 'pkg dump'&quot;</span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>    </span><span id="local-6989586621679716363"><span class="annot"><span class="annottext">parsePackages :: String -&gt; Either [String] [InstalledPackageInfo]
</span><a href="#local-6989586621679716363"><span class="hs-identifier hs-var hs-var">parsePackages</span></a></span></span><span> </span><span id="local-6989586621679716358"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716358"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Either (NonEmpty String) ([String], InstalledPackageInfo)]
-&gt; ([NonEmpty String], [([String], InstalledPackageInfo)])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span> </span><span class="annot"><span class="annottext">([Either (NonEmpty String) ([String], InstalledPackageInfo)]
 -&gt; ([NonEmpty String], [([String], InstalledPackageInfo)]))
-&gt; [Either (NonEmpty String) ([String], InstalledPackageInfo)]
-&gt; ([NonEmpty String], [([String], InstalledPackageInfo)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(String
 -&gt; Either (NonEmpty String) ([String], InstalledPackageInfo))
-&gt; [String]
-&gt; [Either (NonEmpty String) ([String], InstalledPackageInfo)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString
-&gt; Either (NonEmpty String) ([String], InstalledPackageInfo)
</span><a href="Distribution.InstalledPackageInfo.html#parseInstalledPackageInfo"><span class="hs-identifier hs-var">parseInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString
 -&gt; Either (NonEmpty String) ([String], InstalledPackageInfo))
-&gt; (String -&gt; ByteString)
-&gt; String
-&gt; Either (NonEmpty String) ([String], InstalledPackageInfo)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ByteString
</span><a href="Distribution.Utils.Generic.html#toUTF8BS"><span class="hs-identifier hs-var">toUTF8BS</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="#local-6989586621679716354"><span class="hs-identifier hs-var">splitPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716358"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-138"></span><span>            </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716353"><span class="annot"><span class="annottext">[([String], InstalledPackageInfo)]
</span><a href="#local-6989586621679716353"><span class="hs-identifier hs-var">ok</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; Either [String] [InstalledPackageInfo]
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679716352"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679716352"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679716352"><span class="hs-identifier hs-var">pkg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[([String], InstalledPackageInfo)]
</span><a href="#local-6989586621679716353"><span class="hs-identifier hs-var">ok</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-139"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621679716351"><span class="annot"><span class="annottext">[NonEmpty String]
</span><a href="#local-6989586621679716351"><span class="hs-identifier hs-var">msgss</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[([String], InstalledPackageInfo)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Either [String] [InstalledPackageInfo]
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(NonEmpty String -&gt; [String]) -&gt; [NonEmpty String] -&gt; [String]
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty String -&gt; [String]
forall a. NonEmpty a -&gt; [a]
</span><a href="../../base/src/Data.List.NonEmpty.html#toList"><span class="hs-identifier hs-var">NE.toList</span></a></span><span> </span><span class="annot"><span class="annottext">[NonEmpty String]
</span><a href="#local-6989586621679716351"><span class="hs-identifier hs-var">msgss</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span>    </span><span class="annot"><a href="#local-6989586621679716354"><span class="hs-identifier hs-type">splitPkgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-142"></span><span>    </span><span id="local-6989586621679716354"><span class="annot"><span class="annottext">splitPkgs :: String -&gt; [String]
</span><a href="#local-6989586621679716354"><span class="hs-identifier hs-var hs-var">splitPkgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [[String]] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">([[String]] -&gt; [String])
-&gt; (String -&gt; [[String]]) -&gt; String -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [[String]]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679716347"><span class="hs-identifier hs-var">splitWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;---&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [[String]])
-&gt; (String -&gt; [String]) -&gt; String -&gt; [[String]]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span>
</span><span id="line-143"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-144"></span><span>        </span><span id="local-6989586621679716550"><span class="annot"><a href="#local-6989586621679716347"><span class="hs-identifier hs-type">splitWith</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679716550"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679716550"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679716550"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span></span><span>
</span><span id="line-145"></span><span>        </span><span id="local-6989586621679716347"><span class="annot"><span class="annottext">splitWith :: forall a. (a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679716347"><span class="hs-identifier hs-var hs-var">splitWith</span></a></span></span><span> </span><span id="local-6989586621679716346"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679716346"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679716345"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716345"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716344"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [[a]] -&gt; [[a]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716343"><span class="hs-identifier hs-var">zs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-146"></span><span>                           </span><span class="hs-special">[</span><span class="hs-special">]</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-147"></span><span>                           </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679716342"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716342"><span class="hs-identifier hs-var">ws</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; [[a]]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="#local-6989586621679716347"><span class="hs-identifier hs-var">splitWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679716346"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716342"><span class="hs-identifier hs-var">ws</span></a></span><span>
</span><span id="line-148"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679716344"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716344"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679716343"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716343"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679716346"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679716345"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#buildLib"><span class="hs-identifier hs-type">buildLib</span></a></span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span id="buildLib"><span class="annot"><span class="annottext">buildLib :: Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#buildLib"><span class="hs-identifier hs-var hs-var">buildLib</span></a></span></span><span> </span><span id="local-6989586621679716339"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716339"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716338"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679716338"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679716337"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679716336"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716336"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679716335"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716335"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-comment">-- In future, there should be a mechanism for the compiler to request any</span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-comment">-- number of the above parameters (or their parts) &#8212; in particular,</span><span>
</span><span id="line-156"></span><span>  </span><span class="hs-comment">-- pieces of PackageDescription.</span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-158"></span><span>  </span><span class="hs-comment">-- For now, we only pass those that we know are used.</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679716334"><span class="annot"><span class="annottext">odir :: String
</span><a href="#local-6989586621679716334"><span class="hs-identifier hs-var hs-var">odir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-161"></span><span>      </span><span id="local-6989586621679716332"><span class="annot"><span class="annottext">bi :: BuildInfo
</span><a href="#local-6989586621679716332"><span class="hs-identifier hs-var hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716336"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-162"></span><span>      </span><span id="local-6989586621679716330"><span class="annot"><span class="annottext">srcDirs :: [String]
</span><a href="#local-6989586621679716330"><span class="hs-identifier hs-var hs-var">srcDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679716332"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716334"><span class="hs-identifier hs-var">odir</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span>      </span><span id="local-6989586621679716328"><span class="annot"><span class="annottext">dbStack :: PackageDBStack
</span><a href="#local-6989586621679716328"><span class="hs-identifier hs-var hs-var">dbStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; PackageDBStack
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-164"></span><span>      </span><span id="local-6989586621679716326"><span class="annot"><span class="annottext">language :: Language
</span><a href="#local-6989586621679716326"><span class="hs-identifier hs-var hs-var">language</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Language -&gt; Maybe Language -&gt; Language
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="Language.Haskell.Extension.html#Haskell98"><span class="hs-identifier hs-var">Haskell98</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Maybe Language
</span><a href="Distribution.Types.BuildInfo.html#defaultLanguage"><span class="hs-identifier hs-var hs-var">defaultLanguage</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679716332"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>      </span><span id="local-6989586621679716323"><span class="annot"><span class="annottext">progdb :: ProgramDb
</span><a href="#local-6989586621679716323"><span class="hs-identifier hs-var hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-166"></span><span>      </span><span id="local-6989586621679716320"><span class="annot"><span class="annottext">pkgid :: PackageIdentifier
</span><a href="#local-6989586621679716320"><span class="hs-identifier hs-var hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679716338"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716339"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuiteProgram"><span class="hs-identifier hs-var">haskellSuiteProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716323"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-169"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;compile&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--build-dir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716334"><span class="hs-identifier hs-var">odir</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-170"></span><span>    </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-i&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716317"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679716317"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716317"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679716330"><span class="hs-identifier hs-var">srcDirs</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-171"></span><span>    </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-I&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716316"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679716316"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716316"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenComponentModulesDir"><span class="hs-identifier hs-var">autogenComponentModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716335"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-172"></span><span>                              </span><span class="hs-special">,</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#autogenPackageModulesDir"><span class="hs-identifier hs-var">autogenPackageModulesDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716337"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-173"></span><span>                              </span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716334"><span class="hs-identifier hs-var">odir</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679716332"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-174"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; String
</span><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var">packageDbOpt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679716312"><span class="hs-identifier hs-var">pkgDb</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679716312"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679716312"><span class="hs-identifier hs-var">pkgDb</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679716328"><span class="hs-identifier hs-var">dbStack</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--package-name&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679716320"><span class="hs-identifier hs-var">pkgid</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-176"></span><span>    </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--package-id&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679716311"><span class="hs-identifier hs-var">ipkgid</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-177"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679716311"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679716311"><span class="hs-identifier hs-var">ipkgid</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MungedPackageId
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(UnitId, MungedPackageId)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentPackageDeps"><span class="hs-identifier hs-var hs-var">componentPackageDeps</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716335"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-178"></span><span>    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-G&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Language -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679716326"><span class="hs-identifier hs-var">language</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-179"></span><span>    </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-X&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679716309"><span class="hs-identifier hs-var">ex</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679716309"><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679716309"><span class="hs-identifier hs-var">ex</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [Extension]
</span><a href="Distribution.Types.BuildInfo.html#usedExtensions"><span class="hs-identifier hs-var">usedExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679716332"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-180"></span><span>    </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cppOptions"><span class="hs-identifier hs-var hs-var">cppOptions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716336"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679716306"><span class="hs-identifier hs-var">modu</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679716306"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679716306"><span class="hs-identifier hs-var">modu</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716336"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716335"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#installLib"><span class="hs-identifier hs-type">installLib</span></a></span><span>
</span><span id="line-186"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-188"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^install location</span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^install location for dynamic libraries</span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^Build location</span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-193"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span id="installLib"><span class="annot"><span class="annottext">installLib :: Verbosity
-&gt; LocalBuildInfo
-&gt; String
-&gt; String
-&gt; String
-&gt; PackageDescription
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#installLib"><span class="hs-identifier hs-var hs-var">installLib</span></a></span></span><span> </span><span id="local-6989586621679716303"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716303"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716302"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716302"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679716301"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716301"><span class="hs-identifier hs-var">targetDir</span></a></span></span><span> </span><span id="local-6989586621679716300"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716300"><span class="hs-identifier hs-var">dynlibTargetDir</span></a></span></span><span> </span><span id="local-6989586621679716299"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716299"><span class="hs-identifier hs-var">builtDir</span></a></span></span><span> </span><span id="local-6989586621679716298"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679716298"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679716297"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716297"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679716296"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716296"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-196"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679716295"><span class="annot"><span class="annottext">progdb :: ProgramDb
</span><a href="#local-6989586621679716295"><span class="hs-identifier hs-var hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679716302"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-197"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716303"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuitePkgProgram"><span class="hs-identifier hs-var">haskellSuitePkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716295"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;install-library&quot;</span></span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--build-dir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716299"><span class="hs-identifier hs-var">builtDir</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--target-dir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716301"><span class="hs-identifier hs-var">targetDir</span></a></span><span>
</span><span id="line-201"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--dynlib-target-dir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716300"><span class="hs-identifier hs-var">dynlibTargetDir</span></a></span><span>
</span><span id="line-202"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--package-id&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageIdentifier -&gt; String) -&gt; PackageIdentifier -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
forall pkg. Package pkg =&gt; pkg -&gt; PackageIdentifier
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679716298"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-203"></span><span>    </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; String) -&gt; [ModuleName] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679716297"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679716296"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#registerPackage"><span class="hs-identifier hs-type">registerPackage</span></a></span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-207"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span id="registerPackage"><span class="annot"><span class="annottext">registerPackage :: Verbosity
-&gt; ProgramDb -&gt; PackageDBStack -&gt; InstalledPackageInfo -&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#registerPackage"><span class="hs-identifier hs-var hs-var">registerPackage</span></a></span></span><span> </span><span id="local-6989586621679716293"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716293"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716292"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716292"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679716291"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679716291"><span class="hs-identifier hs-var">packageDbs</span></a></span></span><span> </span><span id="local-6989586621679716290"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679716290"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-212"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679716289"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716289"><span class="hs-identifier hs-var">hspkg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716293"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuitePkgProgram"><span class="hs-identifier hs-var">haskellSuitePkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716292"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716293"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(ProgramInvocation -&gt; IO ()) -&gt; ProgramInvocation -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-215"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679716289"><span class="hs-identifier hs-var">hspkg</span></a></span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;update&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; String
</span><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var">packageDbOpt</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageDB -&gt; String) -&gt; PackageDB -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var">registrationPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679716291"><span class="hs-identifier hs-var">packageDbs</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">progInvokeInput :: Maybe IOData
</span><a href="Distribution.Simple.Program.Run.html#progInvokeInput"><span class="hs-identifier hs-var">progInvokeInput</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOData -&gt; Maybe IOData
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(IOData -&gt; Maybe IOData) -&gt; IOData -&gt; Maybe IOData
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IOData
</span><a href="Distribution.Utils.IOData.html#IODataText"><span class="hs-identifier hs-var">IODataText</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IOData) -&gt; String -&gt; IOData
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; String
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679716290"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#initPackageDB"><span class="hs-identifier hs-type">initPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span id="initPackageDB"><span class="annot"><span class="annottext">initPackageDB :: Verbosity -&gt; ProgramDb -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.HaskellSuite.html#initPackageDB"><span class="hs-identifier hs-var hs-var">initPackageDB</span></a></span></span><span> </span><span id="local-6989586621679716281"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716281"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679716280"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716280"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679716279"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716279"><span class="hs-identifier hs-var">dbPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-221"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679716281"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haskellSuitePkgProgram"><span class="hs-identifier hs-var">haskellSuitePkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679716280"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;init&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716279"><span class="hs-identifier hs-var">dbPath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-type">packageDbOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-225"></span><span id="packageDbOpt"><span class="annot"><span class="annottext">packageDbOpt :: PackageDB -&gt; String
</span><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var hs-var">packageDbOpt</span></a></span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--global&quot;</span></span><span>
</span><span id="line-226"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var">packageDbOpt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--user&quot;</span></span><span>
</span><span id="line-227"></span><span class="annot"><a href="Distribution.Simple.HaskellSuite.html#packageDbOpt"><span class="hs-identifier hs-var">packageDbOpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679716275"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716275"><span class="hs-identifier hs-var">db</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--package-db=&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679716275"><span class="hs-identifier hs-var">db</span></a></span><span>
</span><span id="line-228"></span></pre></body></html>